package com.by.controller;

import com.by.core.bean.ResultBean;
import com.by.core.controller.BaseController;
import com.by.entity.Order;
import com.by.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "订单管理")
@RestController
@RequestMapping("api")
public class OrderController extends BaseController {

    @Autowired
    OrderService orderService;


    @ApiOperation("查询")
    @GetMapping("/order")
    public ResultBean query(int id) {
        Order order = orderService.getById(id);
        return success("查询成功", order);
    }
}
